﻿<Window x:Class="ToDoList.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="ToDo List" Height="200" Width="200" AllowsTransparency="True" 
        WindowStyle="None" Icon="/ToDoList;component/icon.ico" ShowInTaskbar="False"
        ResizeMode="NoResize" Closing="Window_Closing" Loaded="Window_Loaded">
    <Window.Background>
        <ImageBrush ImageSource="/ToDoList;component/backGround.jpg" />
    </Window.Background>
    <!-- <Textbox disabled background style> -->
    <Window.Resources>
        <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="Transparent" />
        <Style x:Key="disabledTextbox" TargetType="{x:Type TextBoxBase}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border Name="Border" BorderThickness="0">
                            <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <!-- </Textbox disabled background style> -->
    <Grid>
        <TextBox Name="txtToDo" Style="{StaticResource disabledTextbox}"
             BorderThickness="0" Background="Transparent" 
             VerticalScrollBarVisibility="Hidden" AcceptsReturn="True"
             Height="160" Padding="30,10,0,0" TextWrapping="Wrap"
                 ContextMenuService.ShowOnDisabled="True">
            <TextBox.BitmapEffect>
                <OuterGlowBitmapEffect GlowColor="LightSteelBlue" />
            </TextBox.BitmapEffect>
            <TextBox.ContextMenu>
                <ContextMenu Name="cMtxtToDo">
                    <MenuItem Name="miPin" Header="Pin" Click="miPin_Click"/>
                    <MenuItem Name="miUnpin" Header="Unpin" Click="miUnpin_Click"/>
                    <Separator />
                    <MenuItem Name="miConfiguration" Header="Configuration" Click="miConfiguration_Click"/>
                    <Separator />
                    <MenuItem Name="miExit" Header="Exit" Click="miExit_Click"/>
                </ContextMenu>
            </TextBox.ContextMenu>
        </TextBox>
    </Grid>
</Window>
